package lab02.test01;

class Address {//定义一个地址的类的
    //1.属性：国家、省份、城市、街道、邮编
    private String country;//定义成员变量
    private String province;
    private String city;
    private String row;
    private String postcode;

    Address(String country, String province, String city,
                   String row, String postcode) {
        this.country = country;
        this.province = province;
        this.city = city;
        this.row = row;
        this.postcode = postcode;//有参构造，封装后的数据
    }


    //3.构造函数，单独定义输出的方法
     void print() {
        System.out.println("地址是：" + this.country
                + this.province + this.city
                + this.row + this.postcode);
    }
}
